package com.kob.backend.service.impl.order;

import com.kob.backend.mapper.OrdersMapper;
import com.kob.backend.pojo.orders;
import com.kob.backend.service.order.OrderAddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;
@Service
public class OrderAddServiceImpl implements OrderAddService {
    @Autowired
    private OrdersMapper orderMapper;
    @Override
    public Map<String, String> addorder(Integer userid, Integer shopid, Double order_price,
                                        String order_create,String productname) {
        Map<String, String>map=new HashMap<>();
        orders this_order=new orders(null,userid,shopid,order_price,order_create,"订单未确认",productname);
        orderMapper.insert(this_order);
        map.put("error_message","success");
        return map;
    }
}
